{{template "header.html" .}}
<link href="/assets/css/plugins/iCheck/custom.css" rel="stylesheet">
<link href="/assets/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
<body class="gray-bg">
<div class="row">
    <div class="wrapper animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="wrapper wrapper-content animated fadeInRight">
                    <div class="ibox-content forum-container">
                        <div class="forum-title">
                            <h3><a href="/users">团队成员 </a> / 编辑用户信息</h3>
                        </div>

                        <div class="row">
                            <div class="col-sm-9">
                                <div class="float-e-margins">
                                    <div class="ibox-content">
                                        <form id="myForm" method="post" class="form-horizontal" οnsubmit="return false;">
                                            <div class="form-group"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">用户名</label>

                                                <div class="col-sm-10">
                                                    <input name="username" type="text" class="form-control" value="{{.userInfo.Username}}" readonly>
                                                    <span class="help-block m-b-none text-danger"></span>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">权限组</label>
                                                <div class="col-sm-10">
                                                    <select class="form-control m-b" name="auth">
                                                        {{$GroupId := .userGroup.GroupId}}
                                                        {{range .group}}
                                                            <option value="{{.Groupid}}" {{if eq $GroupId .Groupid}} selected {{end}}>{{.Groupname}}</option>
                                                        {{end}}
                                                    </select>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">用户状态</label>
                                                <div class="col-sm-10">
                                                    <div class="radio i-checks">
                                                        {{$status := .userInfo.Status}}
                                                        {{range $k, $v :=.userStatus}}
                                                            <label class="" style="padding-left:0px;padding-right: 20px;">
                                                                <div class="iradio_square-green" style="position: relative;">
                                                                    <input type="radio" value="{{$k}}" name="status"  {{if eq $k $status}} checked {{end}} >
                                                                </div>
                                                                <i></i> {{$v}}
                                                            </label>
                                                        {{end}}
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">密码</label>

                                                <div class="col-sm-10">
                                                    <input name="password" type="password" class="form-control" value="{{.password}}">
                                                    <span class="help-block m-b-none text-danger"></span>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">手机号</label>
                                                <div class="col-sm-10">
                                                    <input name="phone" type="text" class="form-control" value="{{.userInfo.Phone}}" readonly>
                                                    <span class="help-block m-b-none text-danger"></span>
                                                </div>
                                            </div>
                                            <div class="hr-line-dashed"></div>
                                            <div class="form-group">
                                                <label class="col-sm-2 control-label">E-mail</label>
                                                <div class="col-sm-10">
                                                    <input name="email" type="text" class="form-control" value="{{.userInfo.Email}}" readonly>
                                                    <span class="help-block m-b-none text-danger"></span>
                                                </div>
                                            </div>

                                            <div class="hr-line-dashed"></div>

                                            <div class="form-group">
                                                <div class="col-sm-4 col-sm-offset-2">
                                                    <button class="btn btn-primary btn-info-submit" type="button" userid="{{.userInfo.Uid}}">保存</button>
                                                </div>
                                            </div>
                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="/assets/js/jquery.min.js?v=2.1.4"></script>
<script src="/assets/js/bootstrap.min.js?v=3.3.6"></script>
<script src="/assets/js/plugins/iCheck/icheck.min.js"></script>
<script src="/assets/js/plugins/sweetalert/sweetalert.min.js"></script>
<script src="/assets/js/content.js?v=4.1.0"></script>
<script src="/assets/js/md5.min.js"></script>
<script src="/assets/js/users.js"></script>
<script >
    $(function () {

        $(document).ready(function () {
            $('.i-checks').iCheck({
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });

    })
</script>